﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Medianamik.Core.ImportExport
{
    public class Medianamik2RecordPropertyAdapter : RecordProperty 
    {
        protected NodeProperty NodeProperty
        {
            get;
            private set;
        }

        public Medianamik2RecordPropertyAdapter(NodeProperty prop)
        {
            NodeProperty = prop;
        }

        public override Guid NodeId
        {
            get { return NodeProperty.Node.ID; }
        }

        public override Guid PropertyId
        {
            get
            {
                return NodeProperty.NodeTypePropertyID;
            }
        }

        public override string CultureName
        {
            get { return NodeProperty.Culture.Name; }
        }

        public override string Value
        {
            get { return NodeProperty.Value as string; }
        }

        public override int? Revision
        {
            get
            {
                return NodeProperty.Revision;
            }
        }

        public override DateTime CreatedOn
        {
            get
            {
                return NodeProperty.CreatedOn;
            }
        }
    }
}
